package org.leaf.green.shiro

class Role {

    String name
    Date dateCreated
    Date lastUpdated
    
    static hasMany = [ users: User, permissions: String ]
    static belongsTo = User

    static constraints = {
        name(nullable: false, blank: false, unique: true, maxSize:50)
    }

    String toString() {
        return "$name"
    }
    
    static mapping = {
        table 'SHIRO_ROLE'
    }    
}
